package com.mxchip.livestarmobile.mobile.util;

import android.content.Context;

import com.mxchip.livestarmobile.mobile.Appli;
import com.mxchip.livestarmobile.R;


public class ErrorTextUtils {
    public static String getErrorMsg(String errorcode) {
        Context context = Appli.getContext();
        if (context.getString(R.string.error_code_off_line).equals(errorcode)) {
            return Utils.getString(R.string.off_line_str);
        } else if (context.getString(R.string.error_code_in_the_call).equals(errorcode)) {
            return Utils.getString(R.string.in_the_call_str);
        } else if (context.getString(R.string.error_code_time_out).equals(errorcode)) {
            return Utils.getString(R.string.time_out_str);
        } else if (context.getString(R.string.error_code_refusing_answer).equals(errorcode)) {
            return Utils.getString(R.string.refusing_answer_str);
        } else {
            return Utils.getString(R.string.unknown_error_str);
        }
    }
}
